<nav class="bar bar-nav" ng-init="workCtrl.loadTasks()">
    <a class="icon icon-bars pull-left" ng-click="homeCtrl.showSideBar()"></a>
    <a class="icon icon-search pull-right"></a>
    <h1 class="title">Ktot</h1>
</nav>
<div class="bar bar-standard bar-header-secondary">
    <div class="segmented-control">
        <a class="control-item" modal-dropdown selected-item="workCtrl.search.iterationPath" options-text="'-- All --'" caption="'Iteration Path'" items="workCtrl.availableIterationPaths">
        </a>
        <a class="control-item" modal-dropdown selected-item="workCtrl.search.userStory" options-text="'-- All --'" caption="'User Story'" items="workCtrl.availableUserStories">
        </a>
    </div>
</div>
<div class="content">
    <div class="card" ng-repeat="(itPath, byItPath) in workCtrl.tasks | filter : workCtrl.search | groupBy : 'iterationPath'">
        <ul class="table-view">
            <li class="table-view-cell table-view-divider">{{ itPath }}</li>
            <li class="table-view-cell table-view-divider" ng-repeat-start="(usrStory, byUsrStory) in byItPath | groupBy : 'userStory'"> {{ usrStory }}</li>
            <li class="table-view-cell media" ng-repeat="task in byUsrStory">
                <a class="navigate-right">
                    <i class="media-object pull-left">{{ task.workItemId }}</i>
                    <div class="media-body">
                        {{ task.title }}
                        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore. Lorem ipsum dolor sit amet.</p>
                    </div>
                </a>
            </li>
            <span ng-repeat-end></span>
            <span ng-repeat-end></span>
        </ul>
    </div>
</div>